#include	<iostream>
#include	<sstream>
#include	<map>
#include	<set>
using	namespace	std;
uint64_t	prng=time(NULL);
static inline uint64_t wyrand(uint64_t *seed){	*seed+=0xa0761d6478bd642full;	uint64_t  see1=*seed^0xe7037ed1a0b428dbull;	see1*=(see1>>32)|(see1<<32);	return  (*seed*((*seed>>32)|(*seed<<32)))^((see1>>32)|(see1<<32));}

string	target[3],	mutant[3];
map<string,char>	codon;
void	normalize(string	&s){
	for(size_t	i=0;	i<s.size();	i++)	if(s[i]>='a'&&s[i]<='z')	s[i]=s[i]-'a'+'A';
}

void	mutate(void){
	mutant[0]=target[0];	mutant[1]=target[1];	mutant[2]=target[2];
	for(size_t	m=0;	m<2;	m++){
		size_t	p=wyrand(&prng)%(mutant[0].size()+mutant[1].size()+mutant[2].size()),q;
		string	*s;
		if(p<mutant[0].size()){	q=p-0;	s=&mutant[0];	}
		else	if(p<mutant[0].size()+mutant[1].size()){	q=p-mutant[0].size();	s=&mutant[1];	}
		else{	q=p-mutant[0].size()-mutant[1].size();	s=&mutant[2];	}
		char	c;
		do	c="ACGT"[wyrand(&prng)%4];	while(c==(*s)[q]);
		(*s)[q]=c;
	}
}
bool	check_utr(string	&s){
	if(s.find("ATG")!=string::npos)	return	false;
	if(s.find("TAA")!=string::npos)	return	false;
	if(s.find("TAG")!=string::npos)	return	false;
	if(s.find("TGA")!=string::npos)	return	false;
	return	true;
}
bool	check_cds(string	&s,	string	&r){
	if(s.size()%3)	return	false;
	if(codon[s.substr(0,3)]!='M')	return	false;
	for(size_t	i=0;	i<s.size();	i+=3)	if(codon[s.substr(i,3)]!=codon[r.substr(i,3)])	return	false;
	return	true;
}
int	main(void){
{
	codon["TTT"]='F';	codon["TTC"]='F';	codon["TTA"]='L';	codon["TTG"]='L';
	codon["TCT"]='S';	codon["TCC"]='S';	codon["TCA"]='S';	codon["TCG"]='S';
	codon["TAT"]='Y';	codon["TAC"]='Y';	codon["TAA"]='*';	codon["TAG"]='*';
	codon["TGT"]='C';	codon["TGC"]='C';	codon["TGA"]='*';	codon["TGG"]='W';
	
	codon["CTT"]='L';	codon["CTC"]='L';	codon["CTA"]='L';	codon["CTG"]='L';
	codon["CCT"]='P';	codon["CCC"]='P';	codon["CCA"]='P';	codon["CCG"]='P';
	codon["CAT"]='H';	codon["CAC"]='H';	codon["CAA"]='Q';	codon["CAG"]='Q';
	codon["CGT"]='R';	codon["CGC"]='R';	codon["CGA"]='R';	codon["CGG"]='R';
	
	codon["ATT"]='I';	codon["ATC"]='I';	codon["ATA"]='I';	codon["ATG"]='M';
	codon["ACT"]='T';	codon["ACC"]='T';	codon["ACA"]='T';	codon["ACG"]='T';
	codon["AAT"]='N';	codon["AAC"]='N';	codon["AAA"]='K';	codon["AAG"]='K';
	codon["AGT"]='S';	codon["AGC"]='S';	codon["AGA"]='R';	codon["AGG"]='R';
	
	codon["GTT"]='V';	codon["GTC"]='V';	codon["GTA"]='V';	codon["GTG"]='V';
	codon["GCT"]='A';	codon["GCC"]='A';	codon["GCA"]='A';	codon["GCG"]='A';
	codon["GAT"]='D';	codon["GAC"]='D';	codon["GAA"]='E';	codon["GAG"]='E';
	codon["GGT"]='G';	codon["GGC"]='G';	codon["GGA"]='G';	codon["GGG"]='G';
}
{	
	string	s;	getline(cin,s);	istringstream	si(s);
	getline(si,target[0],'|');	getline(si,target[1],'|');	getline(si,target[2],'|');
	normalize(target[0]);	normalize(target[1]);	normalize(target[2]);
}
	set<string>	se;
	for(size_t	i=0;	i<0x100000;	i++){
		mutate();
		if(check_utr(mutant[0])&&check_cds(mutant[1],target[1])&&check_utr(mutant[2]))
			se.insert(mutant[0]+"|"+mutant[1]+"|"+mutant[2]);
	}
	for(auto	si=se.begin();	si!=se.end();	++si)	cout<<*si<<'\n';
	return	0;
}
